Odd behavior on Shift-{Esc,Fx}

Posted by ??????? ??????????? on Super User See other posts from Super User or by ??????? ???????????
Published on 2012-12-07T04:18:59Z Indexed on 2012/12/07 5:08 UTC
Read the original article Hit count: 362

Filed under:
|
|
|

Sometimes, when changing between the modes in Vim, I forget to take my finger off the Shift key. This innocent mistake is probably part of the luggage carried over from other terminals, but I have never seen my input treated this way.

After changing from command mode to input mode, if I hit the Esc key while the Shift key is down, Vim will display <9b> (Control Sequence Introducer) instead of switching to the command mode.

At least two work-arounds to this intended behavior are available on the mintty site (faq, issue).

" Avoiding escape timeout issues in vim
:let &t_ti.="\e[?7727h"
:let &t_te.="\e[?7727l"
:noremap <Esc>O[ <Esc>
:noremap! <Esc>O[ <Esc>

" Remap escape
:imap <special> <CSI> <ESC>

My question is about the syntax and the meaning of the first solution. From the looks of it, it seems like t_ti is being assigned a literal value, but I'm not sure why the "c address-of" operator is required. I'm also not sure why there are two noremap statements.

© Super User or respective owner

Related posts about vim

Related posts about cygwin